package cn.xfdzx.android.apps.shop.activity.myshop;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import butterknife.BindView;
import butterknife.OnClick;
import cn.xfdzx.android.apps.shop.R;
import cn.xfdzx.android.apps.shop.base.BaseMvpActivity;
import cn.xfdzx.android.apps.shop.bean.SubmitWithdrawalBeen;

/**
 * 账单详情
 */

public class WithdrawalDetailsActivity extends BaseMvpActivity {

    @BindView(R.id.iv_select)
    ImageView ivSelect;
    @BindView(R.id.tv_line_orange)
    TextView tvLineOrange;
    @BindView(R.id.tv_title_hint)
    TextView tvTitleHint;
    @BindView(R.id.tv_time)
    TextView tvTime;
    @BindView(R.id.tv_price)
    TextView tvPrice;
    @BindView(R.id.tv_bank)
    TextView tvBank;



    private SubmitWithdrawalBeen.DataBean dataBean;
    private int type = 0;


    @Override
    public int getLayoutId() {
        return R.layout.activity_withdrawal_details;
    }

    @Override
    public void initView() {
        dataBean = (SubmitWithdrawalBeen.DataBean) getIntent().getSerializableExtra("data");
        type = getIntent().getIntExtra("type", 0);

        if (type==0){
            ivSelect.setImageResource(R.drawable.icon_select_orange);
            tvLineOrange.setBackgroundColor(getResources().getColor(R.color.color_FB9129));
            tvTitleHint.setTextColor(getResources().getColor(R.color.color_FB9129));
        }else {
            ivSelect.setImageResource(R.drawable.icon_select_green);
            tvLineOrange.setBackgroundColor(getResources().getColor(R.color.color_02C557));
            tvTitleHint.setTextColor(getResources().getColor(R.color.color_02C557));
        }

        tvTime.setText(dataBean.getCreate_time());
        tvPrice.setText("¥"+dataBean.getCash_out_money());
        tvBank.setText(dataBean.getCash_out_target()+"  尾号"+dataBean.getCash_out_last_number());


    }

    @Override
    public void showLoading() {

    }

    @Override
    public void hideLoading() {

    }

    @Override
    public void onError(Throwable throwable) {

    }


    @OnClick({R.id.iv_back, R.id.tv_over})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.iv_back:  //返回按钮点击

               case R.id.tv_over:  //返回按钮点击
                finish();
                break;

        }
    }
}
